﻿using EAS.Common.Players;
using Terraria;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;

namespace EAS.Content.Items
{
    public class CactusCushion : ModItem
    {

        public override void SetStaticDefaults()
        {
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }


        public override void SetDefaults()
        {
            Item.accessory = true;
            Item.width = 24;
            Item.height = 26;
            Item.rare = ItemRarityID.Blue;
            Item.value = Item.sellPrice(0, 0, 50, 0);
        }


        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.GetModPlayer<AccPlayer>().CactusCushion = true; ;
        }


        public override void AddRecipes()
        {
            Recipe modRecipe = Recipe.Create(Type, 1);
            modRecipe.AddIngredient(ItemID.Cactus, 50);
            modRecipe.AddTile(TileID.Anvils);
            modRecipe.Register();
        }
    }
}
